package com.swagger.demo.controller;

import com.swagger.demo.domain.Orders;
import com.swagger.demo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * creat by
 *
 * @author heyang
 * @date 2020/8/18 20:25
 */
@RestController
public class GiteeController {
    @Autowired
    private OrderService orderService;

    @RequestMapping("/getAll")
    public List<Orders> selectAllForDB() {
        List<Orders> ordersList = orderService.selectAll();
        return ordersList;
    }
}
